package test;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import struts.acion.Action;
import struts.form.ActionForm;

public class UserAction implements Action {

	public String excute(HttpServletRequest request, ActionForm form,
			Map<String, String> forward) {
		String result = "fail";
		User user = (User) form;
		if("yes".equals(user.getName())){
			result = "success";
		}
		return forward.get(result);
	}

}
